﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FPP.Utilities
{
    public static class ContextUtil
    {
        public static void ForceSave(this FPP.Models.fppEntities context, object model)
        {
            var ose = context.ObjectStateManager.GetObjectStateEntry(model);
            ose.ChangeState(System.Data.EntityState.Modified);

            context.SaveChanges();
        }
    }
}